package cn.exrick.xboot.base.entity

import cn.exrick.xboot.core.base.XbootBaseEntityKt
import cn.exrick.xboot.core.common.utils.SnowFlakeUtil
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

/**
 * @author Fei
 */
@Entity
@Table(name = "su_accident_case")
@TableName("su_accident_case")
@ApiModel(value = "事故案例")
data class AccidentCase(

        @ApiModelProperty("事故所在地")
        var site: String? = "",

        @ApiModelProperty("上传事故案例类型 1.安全顾问上传 2.监管人员上传 ")
        var type: Int? = 1,

        @ApiModelProperty("上传人的区域id")
        var areaId: String? = null,

        @ApiModelProperty("事故企业名称")
        var enterpriseName: String? = "",

        @ApiModelProperty("事故发生时间")
        var time: String? = "",

        @ApiModelProperty("事故死亡人数")
        var deathToll: String? = "",

        @ApiModelProperty("事故受伤人数")
        var injuryNum: String? = "",

        @ApiModelProperty("事故企业类型")
        var enterpriseType: String? = "",

        @ApiModelProperty("事故类型")
        var accidentCaseType: String? = "",

        @ApiModelProperty("事故概况")
        @Column(length = 1000)
        var generalSituation: String? = "",

        @ApiModelProperty("事故图片")
        var pics: String? = ""

) : XbootBaseEntityKt() {

    @Id
    @TableId
    override var id: String = SnowFlakeUtil.nextId().toString()


    companion object {
        const val serialVersionUID = 1L
    }
}